package com.linjiahao.userservice.controller;


import com.linjiahao.commonutils.ResultMap;
import com.linjiahao.serviceChat.service.FriendsAskService;
import com.linjiahao.serviceChat.vo.AddMe_Info;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-10-26
 */
@RestController
@RequestMapping("/userservice/friends-ask")
public class FriendsAskController {

    @Autowired
    FriendsAskService friendsAskService;

    @GetMapping("getAddMe/{id}")
    public ResultMap getAddMe(@PathVariable String id){
        System.out.println(id);
        List<AddMe_Info> addMeByList = friendsAskService.getAddMeByList(id);
        return ResultMap.ok().data("addMeList",addMeByList);
    }
}

